import java.io.IOException;

import javax.imageio.ImageIO;


public class BirdMoineaux extends Bird {

	private static final int MOINEAUX_SPEED = 2;
	private static final int MOINEAUX_TIME = 13;
	private static final int MOINEAUX_IMAGE_WIDTH = 20;
	private static final int MOINEAUX_IMAGE_HEIGHT = 20;
	private static final int MOINEAUX_BIRD_TYPE = 2;

	public BirdMoineaux(){
		super(MOINEAUX_BIRD_TYPE);
		imageWidth = MOINEAUX_IMAGE_WIDTH;
		imageHeight = MOINEAUX_IMAGE_HEIGHT;
		speed = MOINEAUX_SPEED;
		time = MOINEAUX_TIME;
		orientation = -1;
		this.loadRessource();
	}

	public void 	loadRessource() {
		try {
			this.imageArray[0] = ImageIO.read((getClass().getResource("Ressources/bird_moineaux_droit.png")));
			this.imageArray[1] = ImageIO.read((getClass().getResource("Ressources/bird_moineaux_gauche.png")));
		} catch (IOException e) {e.printStackTrace();}
		this.currentImage = this.imageArray[1];
	}

	@Override
	public void setSpeedCoef(double d) {
		if(d > 90) this.speed = this.MOINEAUX_SPEED;
		this.speed = (d/100)*this.MOINEAUX_SPEED;
	}
}
